<?php
/**
* object-oriented file system manipulation as nodes.
* This file belongs to a webappkit package (kit)
* @link http://webappkit.net
* @package pathnodes
* @subpackage common
* @author J.Ducastel <nospam0@ducastel.name>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

/**
* registers as pathnode descendant
*/
pathnode::heritage('textfilenode',10);
/**
* geenric text file node
*/
class textFileNode extends fileNode {
    
    /**
    * returns or sets appropriate newline char(s) as a string
    * @param string $newline optional
    * @access protected
    * @return string
    */
    function newlineString($newline=NULL) {
        if ($newline) $this->newline=$newline;
        return $this->newline;
    }/**/
/*------------------------------------------------------------------------------
                                                                      properties
------------------------------------------------------------------------------*/
    /**
    * @var string new line chars as a string
    */
    var $newline="\n";
    //var $encoding='utf-8';
    // var $mode='unix';
/*------------------------------------------------------------------------------
                                                               protected methods
------------------------------------------------------------------------------*/
    /**
    * detects if path applies to self class.
    * subclasses HAVE to implement this method
    * @param string $path
    * @access protected
    * @return bool
    */
    function selfDetector($path) {
        return ereg('\.txt$',$path);
    }/**/
}
?>
